#ifndef _COMM_COMMUNICATION_H_
#define _COMM_COMMUNICATION_H_

#include "soft_timer.h"
#include <stdint.h>
#include <stddef.h>

typedef uint8_t (*DataHandleFunc)(uint8_t*,uint16_t);

void Comm_DataBufInit(void);

uint8_t DataBufInit(uint8_t* buf,uint16_t buf_size,DataHandleFunc handle,uint16_t timeout);

void Comm_DataReceiveCheck(void);

void Comm_DataReceive(uint8_t bufIndex,uint8_t data);

void Comm_DataHandle(void);

/*阻塞处理*/
uint8_t Comm_DataBlockProcess(uint8_t uartIndex,uint32_t blockTime,DataHandleFunc func);


#endif


